package com.zzx.boot.constant;

/**
 * @author tan
 * @version 1.0
 * @date 2023/7/7 21:09
 */

public enum GlobalEnum {
    INCORRECT_PHONE_VERIFICATION_CODE(70001,"验证码不正确"),
    USER_IS_NOT_REGISTERED(70002,"该用户未注册"),
    LOGIN_ERROR(70003,"登录失败"),
    IMAGE_UPLOAD_ERROR(70004,"图片添加失败"),
    USERNAME_OR_PASSWORD_ERROR(70005,"用户名或者密码错误"),
    REDIS_PARSE_ERROR(70006,"redis解析失败"),
    TOKEN_EXPIRED(7777,"token到期了"),
    BINDUSER_ERROR(7778,"已绑定过了"),
    PARAMS_INVALID(7779,"参数无效,请重新输入"),
    POST_EXISTS_ERROR(7780,"当前文章不存在"),
    COMMENT_UPDATE_ERROR(7781,"评论更新失败"),
    OLDPASSWORD_AND_NEWPASSWORD_INCONSISTENT(7781,"新密码和旧密码不一致"),
    PASSWORD_ERROR(7782,"密码错误"),
    UNABLE_TO_PAY_ATTENTION_TO_ONESELF(7783,"不能关注自己"),
    I_HAVE_ALREADY_FOLLOWED(7784,"已经关注过了,不能重复关注"),
    USER_HAS_NOT_FOLLOWED(7785,"用户未关注过"),
    AUTHENTICATION_ENTRY_POINT(80001,"身份认证失败,请登录!"),
    ACCESSDENIED_HANDLER(403,"您没有权限访问");

    private Integer code;
    private String msg;

    GlobalEnum(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public Integer getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }
}
